package com.example.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import java.io.Serializable;

/**
 * <p>
 * 秒杀库存表
 * </p>
 *
 * @author John123
 * @since 2018-08-27
 */
public class Seckill extends Model<Seckill> {

    private static final long serialVersionUID = 1L;

    /**
     * 商品库存ID
     */
    @TableId(value = "seckill_id", type = IdType.AUTO)
    private Long seckillId;
    /**
     * 商品名称
     */
    private String name;
    /**
     * 库存数量
     */
    private Integer number;
    /**
     * 秒杀开启的时间
     */
    @TableField("start_time")
    private Date startTime;
    /**
     * 秒杀结束的时间
     */
    @TableField("end_time")
    private Date endTime;
    /**
     * 创建的时间
     */
    @TableField("create_time")
    private Date createTime;


    public Long getSeckillId() {
        return seckillId;
    }

    public void setSeckillId(Long seckillId) {
        this.seckillId = seckillId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    protected Serializable pkVal() {
        return this.seckillId;
    }

    @Override
    public String toString() {
        return "Seckill{" +
        "seckillId=" + seckillId +
        ", name=" + name +
        ", number=" + number +
        ", startTime=" + startTime +
        ", endTime=" + endTime +
        ", createTime=" + createTime +
        "}";
    }
}
